package edu.sctu.practice.class01.wangfuxin.day20151014homework.one;

import java.util.Scanner;

/**
 * Created by 鑫爷您慢点 on 2015/10/14.
 */
public class B {
    public void Guess(){
        boolean tag = true;
        while (tag) {
            Scanner scanner = new Scanner(System.in);
            System.out.println("请输入猜测的数值！");
            int guessValue = scanner.nextInt();
            int v = new A().v;
            if (guessValue == v) {
                System.out.println("恭喜你，猜对了！");
                tag = false;
            } else if (guessValue < v) {
                System.out.println("小了");

            } else {
                System.out.println("大了");
            }
        }
    }

    public static void main(String[] args) {
        new B().Guess();
    }
}
